package cn.hk.vaccination.service.impl;

import cn.hk.vaccination.domain.PlanCommonInoculation;
import cn.hk.vaccination.mapper.PlanCommonInoculationMapper;
import cn.hk.vaccination.service.PlanCommonInoculationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 普通人接种计划管理表 服务实现类
 * </p>
 *
 * @author xu
 * @since 2023-03-10
 */
@Service
public class PlanCommonInoculationServiceImpl extends ServiceImpl<PlanCommonInoculationMapper, PlanCommonInoculation> implements PlanCommonInoculationService {
    @Autowired
    private PlanCommonInoculationMapper planCommonInoculationMapper;

    @Override
    public PlanCommonInoculation getByPidAndAgeAndGender(Long pid, Integer age, Integer gender) {

        PlanCommonInoculation planCommonInoculation = planCommonInoculationMapper.selectPlanCommonInoculationByPidAndAgeAndGender(pid, age, gender);
        return planCommonInoculation;
    }

    @Override
    public List<Long> getIdListByAgeAndGender(Integer age,Integer gender) {
        return planCommonInoculationMapper.selectIdListByAgeAndGender( age, gender);
    }

    @Override
    public List<PlanCommonInoculation> getListByAgeAndGender(Integer age, Integer gender) {
        return planCommonInoculationMapper.selectListByAgeAndGender(age,gender);
    }
}
